class UserModel {
  UserModel({
    this.id,
    this.realName,
    this.userName,
    this.salt,
    this.loginPassword,
    this.idCardNumber,
    this.sex,
    this.phoneNumber,
    this.workPlace,
    this.probation,
    this.entryDate,
    this.planTurnRegularWorkerDate,
    this.userType,
    this.userStatus,
    this.isActive,
    this.isInfoLock,
    this.departmentId,
    this.departmentName,
    this.postId,
    this.postName,
    this.createdBy,
    this.createdTime,
    this.updatedBy,
    this.updatedTime,
    this.isDelete,
    this.isUse,
    this.isTakeAttendance,
    this.seniority,
    this.company,
  });

  UserModel.fromJson(dynamic json) {
    id = json['id'];
    realName = json['realName'];
    userName = json['userName'];
    salt = json['salt'];
    loginPassword = json['loginPassword'];
    idCardNumber = json['idCardNumber'];
    sex = json['sex'];
    phoneNumber = json['phoneNumber'];
    workPlace = json['workPlace'];
    probation = json['probation'];
    entryDate = json['entryDate'];
    planTurnRegularWorkerDate = json['planTurnRegularWorkerDate'];
    userType = json['userType'];
    userStatus = json['userStatus'];
    isActive = json['isActive'];
    isInfoLock = json['isInfoLock'];
    departmentId = json['departmentId'];
    departmentName = json['departmentName'];
    postId = json['postId'];
    postName = json['postName'];
    createdBy = json['createdBy'];
    createdTime = json['createdTime'];
    updatedBy = json['updatedBy'];
    updatedTime = json['updatedTime'];
    isDelete = json['isDelete'];
    isUse = json['isUse'];
    isTakeAttendance = json['isTakeAttendance'];
    seniority = json['seniority'];
    company = json['company'];
  }
  String? id;
  String? realName;
  String? userName;
  String? salt;
  String? loginPassword;
  String? idCardNumber;
  num? sex;
  String? phoneNumber;
  String? workPlace;
  num? probation;
  String? entryDate;
  String? planTurnRegularWorkerDate;
  num? userType;
  num? userStatus;
  num? isActive;
  bool? isInfoLock;
  String? departmentId;
  String? departmentName;
  String? postId;
  String? postName;
  String? createdBy;
  String? createdTime;
  String? updatedBy;
  String? updatedTime;
  bool? isDelete;
  bool? isUse;
  num? isTakeAttendance;
  num? seniority;
  String? company;
  UserModel copyWith({
    String? id,
    String? realName,
    String? userName,
    String? salt,
    String? loginPassword,
    String? idCardNumber,
    num? sex,
    String? phoneNumber,
    String? workPlace,
    num? probation,
    String? entryDate,
    String? planTurnRegularWorkerDate,
    num? userType,
    num? userStatus,
    num? isActive,
    bool? isInfoLock,
    String? departmentId,
    String? departmentName,
    String? postId,
    String? postName,
    String? createdBy,
    String? createdTime,
    String? updatedBy,
    String? updatedTime,
    bool? isDelete,
    bool? isUse,
    num? isTakeAttendance,
    num? seniority,
    String? company,
  }) =>
      UserModel(
        id: id ?? this.id,
        realName: realName ?? this.realName,
        userName: userName ?? this.userName,
        salt: salt ?? this.salt,
        loginPassword: loginPassword ?? this.loginPassword,
        idCardNumber: idCardNumber ?? this.idCardNumber,
        sex: sex ?? this.sex,
        phoneNumber: phoneNumber ?? this.phoneNumber,
        workPlace: workPlace ?? this.workPlace,
        probation: probation ?? this.probation,
        entryDate: entryDate ?? this.entryDate,
        planTurnRegularWorkerDate: planTurnRegularWorkerDate ?? this.planTurnRegularWorkerDate,
        userType: userType ?? this.userType,
        userStatus: userStatus ?? this.userStatus,
        isActive: isActive ?? this.isActive,
        isInfoLock: isInfoLock ?? this.isInfoLock,
        departmentId: departmentId ?? this.departmentId,
        departmentName: departmentName ?? this.departmentName,
        postId: postId ?? this.postId,
        postName: postName ?? this.postName,
        createdBy: createdBy ?? this.createdBy,
        createdTime: createdTime ?? this.createdTime,
        updatedBy: updatedBy ?? this.updatedBy,
        updatedTime: updatedTime ?? this.updatedTime,
        isDelete: isDelete ?? this.isDelete,
        isUse: isUse ?? this.isUse,
        isTakeAttendance: isTakeAttendance ?? this.isTakeAttendance,
        seniority: seniority ?? this.seniority,
        company: company ?? this.company,
      );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['realName'] = realName;
    map['userName'] = userName;
    map['salt'] = salt;
    map['loginPassword'] = loginPassword;
    map['idCardNumber'] = idCardNumber;
    map['sex'] = sex;
    map['phoneNumber'] = phoneNumber;
    map['workPlace'] = workPlace;
    map['probation'] = probation;
    map['entryDate'] = entryDate;
    map['planTurnRegularWorkerDate'] = planTurnRegularWorkerDate;
    map['userType'] = userType;
    map['userStatus'] = userStatus;
    map['isActive'] = isActive;
    map['isInfoLock'] = isInfoLock;
    map['departmentId'] = departmentId;
    map['departmentName'] = departmentName;
    map['postId'] = postId;
    map['postName'] = postName;
    map['createdBy'] = createdBy;
    map['createdTime'] = createdTime;
    map['updatedBy'] = updatedBy;
    map['updatedTime'] = updatedTime;
    map['isDelete'] = isDelete;
    map['isUse'] = isUse;
    map['isTakeAttendance'] = isTakeAttendance;
    map['seniority'] = seniority;
    map['company'] = company;
    return map;
  }
}
